// 客户资料
<template>
  <div class="customer">
    <el-container>
      <el-main>
        <div ref="borrow">
          <el-row class="bgc">
            <el-col :span="24"> 企业概况</el-col>
          </el-row>
          <el-row class="bgc pd-20">
            <el-col :span="24"> 开户要素</el-col>
          </el-row>
          <el-form :label-position="labelPosition" label-width="160px" :model="loanInfo" :inline="true">
            <el-form-item label="企业名称">
              <el-input v-model="loanInfo.loan_name" />
            </el-form-item>
            <el-form-item label="企业类型">
              <el-input v-model="loanInfo.method" />
            </el-form-item>
            <el-form-item label="国籍">
              <el-input v-model="loanInfo.apply_quota"> </el-input>
            </el-form-item>
            <el-form-item label="证件类型">
              <el-input v-model="loanInfo.approval_rate"> </el-input>
            </el-form-item>
            <el-form-item label="证件号码">
              <el-input v-model="loanInfo.loan_type" />
            </el-form-item>
            <el-form-item label="证件到期日">
              <el-input v-model="loanInfo.loan_type" />
            </el-form-item>
            <el-form-item label="行业类型">
              <el-input v-model="loanInfo.loan_type" />
            </el-form-item>
            <el-form-item label="企业成立日期">
              <el-input v-model="loanInfo.loan_type" />
            </el-form-item>
            <el-form-item label="法人证件生效日期">
              <el-input v-model="loanInfo.loan_type" />
            </el-form-item>
            <el-form-item label="法人证件失效日期">
              <el-input v-model="loanInfo.loan_type" />
            </el-form-item>
          </el-form>
        </div>

        <div ref="bank">
          <el-row class="bgc pd-20">
            <el-col :span="24">基础信息</el-col>
          </el-row>
          <el-form :label-position="labelPosition" label-width="160px" :model="formLabelAlign" :inline="true">
            <el-form-item label="客户性质">
              <el-input v-model="formLabelAlign.openBank" />
            </el-form-item>
            <el-row class="bgc pd-20">
              <el-col :span="24">联系地址信息</el-col>
            </el-row>
            <el-form-item label="地址类型">
              <el-input v-model="formLabelAlign.branchName" />
            </el-form-item>
            <el-form-item label="是否通讯地址">
              <el-input v-model="formLabelAlign.branchName" />
            </el-form-item>
            <el-form-item label="地址所属国家/区域">
              <el-input v-model="formLabelAlign.branchName" />
            </el-form-item>
            <el-form-item label="地址所属区/县">
              <el-input v-model="formLabelAlign.branchName" />
            </el-form-item>
            <el-form-item label="地址详情">
              <el-input v-model="formLabelAlign.branchName" />
            </el-form-item>
            <el-row class="bgc pd-20">
              <el-col :span="24">联系电话信息</el-col>
            </el-row>
            <el-form-item label="电话类型">
              <el-input v-model="formLabelAlign.branchName" />
            </el-form-item>
            <el-form-item label="国际区号">
              <el-input v-model="formLabelAlign.branchName" />
            </el-form-item>
            <el-form-item label="电话号码">
              <el-input v-model="formLabelAlign.branchName" />
            </el-form-item>
            <el-form-item label="是否为短信接收号码">
              <el-input v-model="formLabelAlign.branchName" />
            </el-form-item>
            <el-form-item label="备注">
              <el-input v-model="formLabelAlign.branchName" />
            </el-form-item>
          </el-form>
        </div>

        <div ref="borrow">
          <el-row class="bgc">
            <el-col :span="24"> 企业高管信息</el-col>
          </el-row>
          <el-row class="bgc pd-20">
            <el-col :span="24"> 法人</el-col>
          </el-row>
          <el-form :label-position="labelPosition" label-width="160px" :model="loanInfo" :inline="true">
            <el-form-item label="法人姓名">
              <el-input v-model="loanInfo.loan_name" />
            </el-form-item>
            <el-form-item label="证件号码">
              <el-input v-model="loanInfo.loan_type" />
            </el-form-item>
            <el-form-item label="证件到期日">
              <el-input v-model="loanInfo.loan_type" />
            </el-form-item>
            <el-form-item label="职业状况">
              <el-input v-model="loanInfo.loan_type" />
            </el-form-item>
            <el-form-item label="担任职务">
              <el-input v-model="loanInfo.loan_type" />
            </el-form-item>
            <el-form-item label="联系电话">
              <el-input v-model="loanInfo.loan_type" />
            </el-form-item>
          </el-form>
        </div>

        <div ref="identity">
          <el-row class="bgc">
            <el-col :span="24">影像采集：营业执照、法人身份证正反面</el-col>
          </el-row>
          <el-form :label-position="labelPosition" label-width="160px" :model="formLabelAlign" :inline="true">
            <el-form-item label="身份证正/反面">
              <el-image style="width: 100px; height: 100px" :src="frontUrl" :zoom-rate="1.2" :preview-src-list="frontList" :initial-index="0" fit="cover" />
            </el-form-item>
            <el-form-item label="手持身份证" style="max-width: 460px">
              <el-image style="width: 100px; height: 100px" :src="versoUrl" :zoom-rate="1.2" :preview-src-list="versoList" :initial-index="0" fit="cover" />
            </el-form-item>
          </el-form>
        </div>
      </el-main>
    </el-container>
  </div>
</template>
<script setup>
import { onMounted, reactive, ref } from "vue";
import { loanFinalAudit, handleLoanFirstAudit, loanReexamine, getImage, queryListInfo, getLoanFinalAudit, loanReexamineInfo, loanFirstAudit, getPhoto, getInfo } from "@/api/loanBefore";
import { bankCardDetail } from "@/api/afterLoan/index";
import { loanTypes, methodType } from "@/utils/dict";
import { ElMessageBox, ElMessage, ElLoading } from "element-plus";
import { useRouter } from "vue-router";
import { getName, getId } from "@/utils/auth";
import $tab from "@/plugins/tab.js";
const router = useRouter();
const labelPosition = ref("right");
const borrow = ref(null);
const identity = ref(null);
const bank = ref(null);
const frontUrl = ref(null); //正面
const frontList = ref([]); //正面预览
const versoUrl = ref(null); //反面
const versoList = ref([]); //反面预览

const props = defineProps({
  // dataFrom: {
  //   type: Object,
  //   required: true,
  // },
  // type: {
  //   type: String,
  // },
});

const state = reactive({
  loanInfo: {}, //借款信息
  formLabelAlign: {
    finalRate: "", // props.dataFrom.approval_rate ? props.dataFrom.approval_rate : "", //终审利率
    finalResult: "", //终审结果
    finalOpinion: "", //终审意见
    finalLimit: "", //终审额度批复
    firstResult: "", //初审结果
    firstOpinion: "", //初审意见
    recheckResult: "", //复审结果
    recheckOpinion: "", //复审意见
    recheckLimit: "", // props.dataFrom.apply_quota ? props.dataFrom.apply_quota : "", //复审额度批复
    recheckRate: "", // props.dataFrom.approval_rate ? props.dataFrom.approval_rate : "", //复审利率
    authentication: "", //人脸认证
    type: "",
    openBank: "", //开户行
    openAddr: "", //开户地
    cardNo: "", //银行账号
    userName: "", //户名
    branchName: "", //支行名称
  },
  lists: [], //展示菜单项
});

const { formLabelAlign, loanInfo } = toRefs(state);
const url = "https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg";
const srcList = [
  "https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg",
  "https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg",
  "https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg",
  "https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg",
  "https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg",
  "https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg",
  "https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg",
];

onMounted(() => {});
</script>

<style>
.demo-form-inline .el-input {
  --el-input-width: 220px;
}
</style>

<style lang="scss" scoped>
// :deep(.el-container) {
//   // padding: 20px;
// }
.customer {
  overflow: auto;
}
.bgc {
  background: #f2f2f2;
  margin-bottom: 5px;
  height: 30px;
  line-height: 30px;
  font-size: 16px;
}
.box1 {
  text-align: center;
  color: #999;
  border-bottom: 1.5px solid #e4e4e4;
  &:hover {
    cursor: pointer;
    color: #000;
  }
}
.pd-20 {
  padding-left: 20px;
}
.mg-30 {
  margin-left: 100px;
}

:deep(.el-aside) {
  margin-top: 5px;
  background: #fff;
}
:deep(.el-main) {
  padding: 0;
  // flex: 80%;
}
.active {
  text-align: center;
  color: #000;
  border-bottom: 2px solid #000;
}
.personStyle {
  margin-right: 20px;
}
:deep(.el-form-item--default) {
  margin-bottom: 5px;
  width: 40%;
}
:deep(.el-select) {
  width: 100%;
}
:deep(.el-form-item) {
  margin-right: 120px;
}
.customer-right {
  position: fixed;
  border: 1px solid #e4e4e4;
  padding: 20px;
}

.item-mg {
  margin-top: 38px;
}
</style>
